<!DOCTYPE html>
<html>
<head>
  <title>Energia Reference - FAQ </title>
  <link rel="shortcut icon" type="image/x-icon" href="http://energia.nu/favicon.png">
  <link rel='stylesheet' href='energiaWideRender.css' type='text/css' />
    <!--HeaderText--><style type='text/css'></style>  
  <meta name='robots' content='index,follow' />
  <meta name="Author" content="Robert Wessels" />
  <meta name="Publisher" content="Energia" />
  <meta name="Keywords" content="Energia, Wiring, Processing, Maker, LaunchPad, Arduino, Texas Instruments, Sketch, MSP430, mspgcc, mpsdebug, Electronic Arts, Programming, C, C++, Robert Wessels" />
  <meta name="Description" content="Energia is a rapid prototyping platform for the Texas Instruments MCU Launchpad. Energia is based on Wiring and Arduino and uses the Processing IDE." />
  <meta name="Copyright" content="All contents copyright Robert Wessels" />
  <meta name="Author" content="Robert Wessels" />
  <meta name="Publisher" content="Energia" />
  <meta name="Keywords" content="Energia, Wiring, Processing, Maker, LaunchPad, Arduino, Texas Instruments, Sketch, MSP430, mspgcc, mpsdebug, Electronic Arts, Programming, C, C++, Robert Wessels" />
  <meta name="Description" content="Energia is a rapid prototyping platform for the Texas Instruments MCU Launchpad. Energia is based on Wiring and Arduino and uses the Processing IDE." />
  <meta name="Copyright" content="All contents copyright Robert Wessels" />
</head>
<body>
<div id="page">
  <!--PageHeaderFmt-->
  <div id="pageheader">
    <div class="title"><a href='http://energia.nu'>Energia</a></div>
  </div>
  <!--/PageHeaderFmt-->

  <!--PageLeftFmt-->
  <div id="pagenav">
    <div id="navbar">
  	<p><a class='wikilink' href='http://energia.nu/'>Home</a>
<a class='wikilink' href='http://energia.nu/download'>Download</a>
<a class='wikilink' href="http://energia.nu/buy/">Buy</a>
<a class='wikilink' href='Guide_index.html'>Getting Started</a>
<a class='wikilink' href='index.html'>Reference</a>
<a class="wikilink" href="http://energia.nu/help/">Getting Help</a>
<a class="wikilink" href="http://energia.nu/faq/">FAQ</a>
<a class="wikilink" href="http://energia.nu/projects/">Projects Using Energia</a>
<a class="wikilink" href="http://energia.nu/contact/">Contact Us</a>
</p>
<p class='vspace'></p>

    </div>
  </div>
  <!--/PageLeftFmt-->

  <div id="pagetext">
  <!--PageText-->
<div id='wikitext'>
<h2>Frequently Asked Questions</h2>

<p>Energia is a software framework that allows hardware programmers to quickly start interacting with embedded systems like microcontrollers. These small computers are built to be low power and control relatively simple applications compared to desktop and laptop computers that power screens and run computationally intensive programs. 
Our home computers are great at communicating with other computers and (sometimes) with
us, but they have no idea what is going on in the world around them. Microcontrollers, on the other
hand, are made to be hooked up to sensors which feed it physical information. These can be
as simple as pressing a button, or as complex as using ultrasound to detect distance, or
maybe having your garage door tweet every time it's opened.
So the microcontroller is essentially a simple computer with eyes and ears. Why is it so popular?
Because the hardware is cheap, it's easy to program (especially with the help of tools like Energia), and there is a huge web community,
which means that beginners can find help and download a variety of programs.
</p><p class='vspace'></p>
<p>
What is hardware sketching? The idea is to explore lots of ideas very
quickly, select the more interesting ones, refine and produce prototypes in an iterative
process. How it works is to write a few lines of code, connect a few electronic components to the Wiring
hardware and observe how a light turns on when person approaches it, write a few more
lines, add another sensor, and see how this light changes when the illumination level in a
room decreases. In the end, Energia, with the help of LaunchPad boards, is basically an ecosystem for easy, hardware-oriented, real-world
programming. It combines the Tools, Software and Hardware for talking to the world.
</p><p class='vspace'></p>
<p>
/ener - gia/ ; e * ner * gi * a
Energia (Russian: Energiya, "Energy") was a Soviet rocket that was designed by NPO
Energia to serve as a heavy-lift expendable launch system as well as a booster for the Buran
spacecraft.
</p><p class='vspace'></p>
<p>
Energia is a rapid electronics prototyping platform for the Texas Instruments LaunchPad.
Energia is based on Wiring and Arduino and uses the Processing IDE. It is a fork of the Arduino
ecosystem, but centered around the popular TI microntrollers: MSP430 and ARM Cortex-M4F.
Similar to it's predecessor, it is an open-source project. It's development is community supported,
and hosted on github.com.
</p><p class='vspace'></p>
<h3>Energia Lineage</h3>

<p>Design By Numbers (or DBN programming language) was an influential experiment in teaching
programming initiated at the MIT Media Lab during the 1990s. Led by John Maeda and his
students they created software aimed at allowing designers, artists and other non-programmers
to easily start computer programming. The software itself could be run in a browser and published
alongside the software was a book and courseware.
</p><p class='vspace'></p>
<p>Processing (2001) - One of the stated aims of Processing is to act as a tool to get nonprogrammers
started with programming, through the instant gratification of visual feedback. This process is called sketching with hardware; explore lots of ideas very quickly, select the
more interesting ones, refine and produce prototypes in an iterative process.
</p><p class='vspace'></p>
<p>Wiring (2003) - The Wiring IDE is a cross-platform application written in Java which is derived
from the IDE made for the Processing programming language. It is designed to introduce
programming and sketching with electronics to artists and designers. It includes a code editor
capable of compiling and uploading programs to the board with a single click. The Wiring IDE comes with a C /C++ library called "Wiring", which makes common
input/output operations much easier. Wiring programs are written in C/C++, although users
only need to define two functions to make a runnable program: setup() and loop().
When the user clicks the "Upload to Wiring hardware" button in the IDE, a copy of the code is
written to a temporary file with an extra include header at the top and a very simple main()
function at the bottom, to make it a valid C++ program.
</p><p class='vspace'></p>
<p>Arduino7 (2005) - In Ivrea, Italy, a project was initiated to make a device for controlling student-built interaction design projects with less expense than with other prototyping systems available at the time. Founders Massimo Banzi and David Cuartielles named the project after Arduin of Ivrea, the main historical character of the town.
The Arduino project is a fork of the open source Wiring platform and is programmed using a Wiring-based language (syntax and libraries), similar to C++ with some slight simplifications and modifications, and a Processing-based integrated development environment.
</p><p class='vspace'></p>
<p>Fritzing (2009) - An open-source initiative to support designers, artists, researchers and hobbyists to take the step from physical prototyping to actual product.
It's essentially an Electronic Design Automation software with a low entry barrier, suited for the needs of designers and artists. It uses the metaphor of the breadboard, so that it is easy to transfer your hardware sketch to the software. From there it is possible to create PCB layouts for turning it into a robust PCB yourself or by help of a manufacturer.
</p><p class='vspace'></p>
<p>Energia (2012) - Energia is a fork of Arduino which utilizes the Texas Instruments microcontroller Launchpad development boards. It takes the concepts learned from the past iterations of Wiring and adapts them for the growing LaunchPad and BoosterPack ecosystem.
</p><p class='vspace'></p>
<p>Programming in Energia is relatively easy. Essentially, it is C/C++ programming, but the Wiring
library simplifies many tasks. As an example, we use the Blink sketch (i.e. program) that is one of
examples that is included with Energia. In fact, this example is so ubiquitous that
most engineers think of it as "Hello World" of embedded programming.
</p><p class='vspace'></p>
How does the 'Wiring' library help to make things easier?
<ul> 
<li>A sketch only requires two functions:</li>
<ul><li>setup() - a function run once at the start of a program which can be used to define initial environment settings
</li><li>loop() - a function called repeatedly until the board is powered off
</li></ul>
<li>Reading and Writing pins (i.e. General Purpose Input Output - GPIO) is encapsulated in
three simple functions: one function defines the I/O pin, the other two let you read or write
the pin. In the blink example, this allows us to turn on/off the LED connected to a pin on
our microcontroller.
</li><li>The delay() function makes it simple to pause program execution for a given number of
microseconds. In fact, in the Energia implementation, the delay() function even utilizes a
timer which allows the processor to go into low power mode while waiting.
</li><li>Finally, Energia makes using the serial port as easy as using printf() in standard C programs.
</li></ul>
</p><p class='vspace'></p>
About the only difference between Arduino and Energia programming is that you might see some
hardware specific commands in the sketch. For example, you can change the clock source for the TI MSP430 microcontroller. Changing clocks is
often done on the MSP430 so that you can balance processing speed against long battery life.
</p><p class='vspace'></p>


<h3>What commands are available when programming with 'Wiring' in Energia?</h3>
<p>Energia provides a <a class='urllink' href='http://energia.nu/reference/' rel='nofollow'>language reference</a> on their website. This defines the operators, controls, and
functions needed for programming in Energia. You will also find a similar HTML
reference available in the Energia installation zip file.
</p><p class='vspace'></p>

<h3>How does the 'Wiring' language compare to standard C code?</h3>
<p>This comparison helps to demonstrate the simplicity of programming with Energia. As stated
before, this can make for very effective rapid prototyping.
Later, during one of the lab exercises, we will examine some of the underpinings of Wiring.
Although the language makes programming easier, the same actual code is required for both
sides of this diagram. In the case of Wiring, this is encapsulated by the language/library. You will
see later on where this is done; armed with this knowledge, you can change the default values
defined by the folks who ported Arduino over to Energia for the TI microcontrollers.
</p><p class='vspace'></p>

<h3>What is Energia?</h3>
<p>Glad you asked, we have a great introduction page on Energia, <a class='urllink' href='http://energia.nu/guide/' rel='nofollow'>click here to read it.</a>
</p><p class='vspace'></p>

<h3>What do you mean by open-source hardware/software?</h3>
<p>Open-source hardware shares much of the principles and approach of free and open-source software.  People can study the hardware to understand how it works, make changes to it, and share those changes.  To facilitate this, TI releases all of the original design files (EAGLE, BOM, Gerber files) for the LaunchPad hardware on their wiki. 
</p><p class='vspace'></p>
<p>The Energia software is also open-source.  The source code for the Java environment is released under the GPL and the C/C++ microcontroller libraries are under the LGPL.
</p><p class='vspace'></p>

<h3>How can I get a LaunchPad board?</h3>
<p>You can buy a LaunchPad board directly from Texas Instruments through their online eStore or through one of their distributors.  Typically you will find the best price direct from the manufacturer.</a> 
</p><p class='vspace'></p>

<h3>Who makes LaunchPad boards?</h3>
<p>Official LaunchPad boards are designed by the MCU group of Texas Instruments, Inc.  Most of the official LaunchPad boards are manufactured by Lierda in China. Unofficial LaunchPads have been created by third parties but don't offer anywhere near the support and community of the TI LaunchPads and therefore are not very popular. 
</p><p class='vspace'></p>

<h3>Which are the official LaunchPad boards?</h3>
<p>The official LaunchPad boards are the ones listed in the getting started guide. Energia supports all the Texas Instruments created LaunchPads as well as a few additional EVMs (evaluation modules) and kits that are easily integrated into Energia. 
</p><p class='vspace'></p>
<p>In general, use of the name "LaunchPad" is restricted to the official boards. If you find a product under a different name but described as "LaunchPad compatible", it's probably not an official board and will not be fully supported by Texas Instruments engineers.
</p><p class='vspace'></p>

<h3>I want to design my own board. What should I do?</h3>
<p>The reference designs for the LaunchPad boards are available to the public. If you're looking to make something of interest to the community, we'd encourage you to discuss your ideas on the Forum so that potential users can offer suggestions.  Keep in mind designing your own LaunchPad is a difficult task, however, a BoosterPack can expand the functionality of your LaunchPad board and is not as hard to design and build as you may think. Check out the Texas Instruments <a href='http://ti.com/byob'>BYOB (Build Your Own BoosterPack) Page</a> for more details.
</p><p class='vspace'></p>

<h3>What should I call my boards?</h3>
<p>If you're making your own board, come up with your own name! This will allow people identify you with your products and help you to build a brand. Be creative: try to suggest what people might use the board for, or emphasize the form factor, or just pick a random word that sounds cool. "LaunchPad" is a trademark of Texas Instruments and should not be used for unofficial variants. 
<p>While unofficial products should not have "LaunchPad" in their name, it's okay to describe your product in relation to the LaunchPad platform. Here are a few guidelines that explain which uses we consider reasonable.
Not okay:
</p><ul><li>LaunchPad Xxxxxx
</li><li>Xxxxxx LaunchPad
</li><li>LaunchPad Compatible Xxxxxx - use "Xxxxxx (Arduino-Compatible)" instead
</li></ul>
Okay:
<ul><li>Xxxxxx for LaunchPad - products that work with official LaunchPad boards (e.g. BoosterPacks)
</li><li>Xxxxxx (LaunchPad-Compatible) - variations and clones which are software and hardware compatible
</li></ul>

<h3>Can I build a commercial product based on LaunchPad?</h3>
<p>Yes, with the following conditions:
<ul><li>Physically embedding a LaunchPad board inside a commercial product does not require you to disclose or open-source any information about its design.
</li><li>Deriving the design of a commercial product from the Eagle files for a LaunchPad board requires you to release the modified files under the same license. You may manufacture and sell the resulting product.
</li><li>Using the Energia core and libraries for the firmware of a commercial product does not require you to release the source code for the firmware. The LGPL does, however, require you to make available object files that allow for the relinking of the firmware against updated versions of the Energia core and libraries. Any modifications to the core and libraries must be released under the LGPL.
</li><li>The source code for the Energia environment is covered by the GPL, which requires any modifications to be open-sourced under the same license. It does not prevent the sale of derivative software or its inclusion in commercial products.
</li></ul><p>In all cases, the exact requirements are determined by the applicable license. Additionally, see the previous question for information about the use of the name "LaunchPad".
</p>
<p class='vspace'></p><p><a name='linux' id='linux'></a>
<h3>How can I run the Energia IDE under Linux?</h3>
<p>See instructions for Linux can be found in the getting started guide.  You can also compile directly from the command line using MSPGCC.

<h3>Can I program the LaunchPad board in C?</h3>
<p>In fact, you already are; the Energia language is merely a set of C/C++ functions that can be called from your code.  Your sketch undergoes minor changes (e.g. automatic generation of function prototypes) and then is passed directly to a C/C++ compiler (MSPGCC).  All standard C and C++ constructs supported by MSPGCC should work in Energia.  For more details, see the page on the Energia build process in the gettting started guide.

<h3>Can I use a different IDE to program the LaunchPad board?</h3>
<p>It is possible to compile programs for the LaunchPad using other build tools (e.g. Code Composer Studio).  Refer to the Texas Instruments LaunchPad website for details on the software environments that are supported.

<h3>Can I use a LaunchPad board without the Energia software?</h3>
<p>Of course.  It's just a TI development board, you can use C to program it, like most microcontroller boards.

<h3>Can I use the Energia software with other Texas Instruments development boards?</h3>
<p>Yes, although it may require some modifications to the Energia core libraries.  For ease of use and standardization, Energia is primarily for LaunchPad boards, but other TI EVMs can potentially be supported since they leverage similar architectures and software.  The truth is the community's hands are full with just the LaunchPads and expanding to other boards will diminish the quality of support for the LaunchPad platform.

<h3>Where is the troubleshooting section?</h3>
<p>These questions have moved to the troubleshooting section of the Energia getting started guide.

<h3>Do you have a Privacy Policy about my data as an Energia user</h3>
<p>Yes, check out our Privacy Policy page. There you will see how we handle visitor's information and our non-disclosure policies.
</p>
</div>


  </div>

  <!--PageFooterFmt-->
  <div id="pagefooter">
&copy;Energia | 
  <a href='FAQ.html?action=edit'>Edit Page</a> | <a href='FAQ.html?action=diff'>Page History</a> | <a href='FAQ.html?action=print' target='_blank'>Printable View</a> | <a href='#'>All Recent Site Changes</a>
  </div>
  <!--/PageFooterFmt-->

</div>
</body>
</html>
